package com.ecode.ecny.dto;

import com.alibaba.fastjson.annotation.JSONField;
import com.ecode.ecny.base.RspBody;
import com.ecode.ecny.base.RspHead;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

/**
 * @ClassName BaseRspDTO
 * @Author mjlft
 * @Date 2021/8/12 21:17
 * @Version 1.0
 * @Description 基础响应类
 */
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class BaseRspDTO<T extends RspBody> {
    @JSONField(name = "head")
    private RspHead head;

    @JSONField(name = "body")
    private T body;

    public BaseRspDTO() {
    }

    public BaseRspDTO(RspHead head) {
        this.head = head;
    }
}
